<?php 

defined('G_IN_SYSTEM')or exit('No permission resources.');
define("MEMBER",true);
System::load_app_class('RSA');
class base extends SystemAction {
    public  $rsa = null;
	  protected $re = array ("code" => "", "msg" => "","version"=>"0.1");//返回集
	public function __construct(){		
     $this->rsa = new RSA('/alidata/www/rsa_key/ios_public_key.pem','/alidata/www/rsa_key/at97_private_key.pem');
	}

	public function success($info)
    {
        $this->re['code'] = "200";
        $this->re['msg'] = 'succeed';
        $this->re['info'] = $info;
        header('Content-Type:application/json; charset=utf-8');
       exit(json_encode($this->re, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES));  
    }

    public function failed($info)
    {
        $this->re['code'] = "0";
        $this->re['msg'] = $info;
        header('Content-Type:application/json; charset=utf-8');
         exit(json_encode($this->re, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES));  
    }
	

	
}
?>